gtkwindow: remove headerbar after disposing parent
authorOlivier Fourdan <ofourdan@redhat.com>
Wed, 25 Nov 2015 17:06:53 +0000 (18:06 +0100)
committerOlivier Fourdan <ofourdan@redhat.com>
Tue, 1 Dec 2015 15:18:03 +0000 (16:18 +0100)
Widgets such as gtkfilechooser may be saving their size and position on
the unmap callback, if the client-side decoration header bar is removed
first, the reported size will be wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=756618

gtk/gtkwindow.c

index 849ff8c1969a7988b45746ea574b5b558b6fbaf6..6680ec8017bae346dac68478a843f8f454db2096 100644 (file)
@@ -3119,12 +3119,12 @@ gtk_window_dispose (GObject *object)
   GtkWindow *window = GTK_WINDOW (object);
   GtkWindowPrivate *priv = window->priv;
 
-  unset_titlebar (window);
   gtk_window_set_focus (window, NULL);
   gtk_window_set_default (window, NULL);
   remove_attach_widget (window);
 
   G_OBJECT_CLASS (gtk_window_parent_class)->dispose (object);
+  unset_titlebar (window);
 
   while (priv->popovers)
     {